import Apis from "@/apis"

export enum EnumSort {
    Popular = "Popular",
    // Newest = "Newest",
    "A-Z" = "A-Z",
}

type MemberIndexResponse = Awaited<ReturnType<typeof Apis.v1.refGetIndexCache>>

export type MemberIndexBannerItem = NonNullable<
    //@ts-ignore
    NonNullable<NonNullable<MemberIndexResponse["data"]>["data"]>["banners"]
>[number]

export type TypeGameBrandItem = ApiTypes.Fetcher.Util.ExtractItemFromListApi<
    typeof Apis.v1.getGameList
>

export type TypeMemberIndexGameListItem = NonNullable<
    NonNullable<NonNullable<NonNullable<MemberIndexResponse["data"]>["data"]>["list"]>["Bingo"]
>[number]

export type TypeMemberIndexNavListItem = NonNullable<
    NonNullable<NonNullable<NonNullable<MemberIndexResponse["data"]>["data"]>["nav"]>["Slot"]
>[number]

type RefGamePlatformResponse = Awaited<ReturnType<typeof Apis.v1.refGetGamePlatform>>

export type RefGamePlatformListItem = NonNullable<
    NonNullable<NonNullable<RefGamePlatformResponse["data"]>["data"]>["d"]
>[number]

export type RefGetGameListQuery = NonNullable<Parameters<typeof Apis.v1.refGetGameList>[0]>

type RefGameListResponse = Awaited<ReturnType<typeof Apis.v1.refGetGameList>>

export type RefGameListItem = NonNullable<
    NonNullable<NonNullable<RefGameListResponse["data"]>["data"]>["d"]
>[number]

type RefGameFavListResponse = Awaited<ReturnType<typeof Apis.v1.refGetGameFavList>>

export type RefGameFavListItem = NonNullable<
    NonNullable<NonNullable<RefGameFavListResponse["data"]>["data"]>["d"]
>[number]
